home *** CD-ROM | disk | FTP | other *** search
-
- /* get_response() is the menu() and dir_menu() operator selection function */
- /* that returns the character selected by keyboard or the mouse selection */
- /* if mouse_flag is not zero */
-
- static int get_response()
- {
- int ret_val= -1;
-
- while(ret_val == -1)
- {
- if((mouse_flag != MOUSE_ONLY) && kbhit())
- {
- ret_val=getch();
- if(ret_val==ALT)
- ret_val=get_extended_key();
- /* clear the keyboard buffer */
- while(kbhit())
- getch();
- }
- else
- if(mouse_flag != KEYBOARD_ONLY)
- ret_val=mouse_read();
-
- }
- return ret_val;
-
- }
-
-